<% present saved_search do |saved_search_presenter| %>
    <li data-saved-search-id="<%= saved_search.id %>" data-feed-id="saved-search-<%= saved_search.id %>" class="collection-saved-search" data-behavior="keyboard_navigable">
        <%= link_to saved_search_path(saved_search.id),
            remote: true,
            class: "feed-link saved-search-link",
            data: {
                behavior: "selectable show_entries open_item feed_link has_settings",
                mark_read: {type: "saved_search", data: saved_search.id, message: "Mark #{saved_search.name} as read?"}.to_json,
                sourceable_target: "source",
                action: "sourceable#selected",
                dialog_id: Dialog::EditSavedSearch.dom_id,
                sourceable_payload_param: saved_search.sourceable.to_h,
                settings_path: edit_saved_search_path(saved_search)
            } do
        %>
            <span class="link-inner">
                <span class="favicon-wrap">
                  <span class="favicon favicon-default favicon-character-<%= saved_search.first_letter %>" data-color-hash-seed="<%= saved_search.id %>"></span>
                </span>

                <span class="collection-label-wrap"><%= saved_search_presenter.name %></span>
                <span class="count-wrap">
                    <%= content_tag :span, "", class: "count", data: {behavior: "needs_count", count_group: "bySavedSearch", count_group_id: saved_search.id} %>
                </span>
                <%= render SourceMenu::Search.new(saved_search: saved_search, source_target: "saved-search-#{saved_search.id}") %>
            </span>
        <% end %>
    </li>
<% end %>
